import request from '@/utils/request'

/** @此文件弃用 */

// 查询长租订单列表
export function listBasic(query) {
  return request({
    url: '/longOrder/basic/list',
    method: 'get',
    params: query
  })
}

// 查询长租订单详细
export function getBasic(orderNo) {
  return request({
    url: '/longOrder/basic/' + orderNo,
    method: 'get'
  })
}

// 新增长租订单
export function addBasic(data) {
  return request({
    url: '/longOrder/basic',
    method: 'post',
    data: data
  })
}

// 修改长租订单
export function updateBasic(data) {
  return request({
    url: '/longOrder/basic',
    method: 'put',
    data: data
  })
}

// 删除长租订单
export function delBasic(orderNo) {
  return request({
    url: '/longOrder/basic/' + orderNo,
    method: 'delete'
  })
}

// 导出长租订单
export function exportBasic(query) {
  return request({
    url: '/longOrder/basic/export',
    method: 'get',
    params: query
  })
}

// 选择车型
export function classificationMoldelList(data) {
  return request({
    url: '/longOrder/basic/classificationMoldelList',
    method: 'post',
    data: data
  })
}


/*
|--------------------------------------------------------------------------
| 订单分配 https://www.showdoc.com.cn/1872553987197478/8677617579402811
|--------------------------------------------------------------------------
*/

// 分配选择用户列表
export function geUserlist(query) {
  return request({
    url: '/longOrder/basic/geUserlist',
    method: 'get',
    params: query
  })
}

// 长租订单分配业务员
export function distribution(data) {
  return request({
    url: '/longOrder/basic/distribution',
    method: 'put',
    data: data
  })
}